cat /usr/lib/bootsectors/comboot your_com_file > /dev/fd0
You use comboot by concatenating it with the .COM file that you want to boot and then writing the two files together to a raw floppy disk. The floppy is now a bootable diskette which boot the .COM file. You should be able to write the same image to any kind of floppy diskette because the boot sector will find out what kind of diskette it has been written to and will arrange its reads accordingly.
at 0x100 (256 decimal) bytes after the start of the code segment (the address pointed to by the i386 CS register). comboot currently loads its target file at 0x10000 (64 kilobytes), although this can be changed by editting in SYSSEG parameter of comboot.S in the source tree.
Since .COM files are limited to 64 kilobytes by DOS and all floppy disks are larger than 64 kilobytes and the contents of memory at boot time is undefined anyway, comboot just loads 64 kilobytes and jumps to it regardless of the actual size of the .COM file. If you want to make a boot sector that will run slightly faster by only loading the actual number of sectors you need, you can edit the source code (comboot.S) and change the parameter SYSSIZE to the size of your file in 16 byte blocks (i.e., (file_size+15)/16). In general, the loading with the generic comboot boot sector goes by quickly enough that it is probably not worth the bother making a special boot sector to boot a smaller .COM file slightly more quickly.
Of course, DOS is not loaded when you use comboot, so these .COM files cannot make any calls to DOS, although they can call the BIOS.
cat /usr/lib/bootsectors/comboot ne.o > /dev/fd0
To make a bootable floppy from the 3c509 ethernet boot file (3c509.o) produced by the etherboot software package, you would type the following:
cat /usr/lib/bootsectors/comboot 3c509.o > /dev/fd0
The source tree for comboot also uses the as86 and ld86 utilities for compiling and linking real mode assembler files as Minix executables under Linux, which were written by Doug Evans.
The makebootsect program used in the source tree to extract a 512 byte boot sector from a Minix executable is a stripped down version of arch/i386/boot/tools/build.c from the linux 1.3.95 kernel source tree.